package state.practice_02;

/**
 * @author yi qiang
 * @date 2021/6/15 17:14
 */
public class StateTest {
    public static void main(String[] args) {
        //停止状态
        MetroContext context=new MetroContext(new StoppingState());
        context.running();
        context.openDoor();
        context.closeDoor();
        context.stopping();
        //启动状态
        context.setNowState(new RunningState());
        context.running();
        context.stopping();
        context.openDoor();
        context.closeDoor();
    }
}
